package com.fanqiechaodan.adapter;

/**
 * @author fanqiechaodan
 * @Classname Demo
 * @Description 适配器模式
 */
public class Demo {

    public static void main(String[] args) {
        // 类适配器
        USB usb1 = new PowerSocketToUSBAdapter();
        usb1.charge();

        System.out.println();

        // 对象适配器
        USB usb2 = new PowerSocketToUSBAdapter1(new PowerSocket());
        usb2.charge();
    }
}
